package com.lzm.ydpt.mvp.api;

import org.json.JSONObject;

import java.util.Map;

import okhttp3.MediaType;
import okhttp3.RequestBody;

public class RequestUtil {

    public static RequestBody getRequestBody(Map<String,Object> map){
        JSONObject jsonObject = new JSONObject(map);
        RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), jsonObject.toString());
        return body;
    }
}
